The present invention is directed generally to rendering transparent digital ink, and more particularly to improved ways of rendering transparent digital ink dynamically.
The term xe2x80x9cdigital inkxe2x80x9d refers to one or more strokes that are recorded from a pointing device, such as a mouse, a stylus/pen on a digitizer tablet, or a stylus/pen on a display screen integrated with a digitizer tablet (e.g., a touch-sensitive display screen). As used herein, the term xe2x80x9cinkxe2x80x9d is shorthand for digital ink. Also, the term xe2x80x9cpenxe2x80x9d and xe2x80x9cstylusxe2x80x9d are used generically and interchangeably. Each stroke may be stored as one or more ink packets, in which each ink packet may contain coordinates (x, y) corresponding to the position of the pointing device. For example, a user may move a pen along a touch-sensitive display screen of a computer system so as to draw a line or curve, and the computer system may sample the coordinates (x, y) along the trajectory of the pen tip position over time (or on any other interval as known in the art) as the user moves the pen. These coordinates represent points along the curve or line and are stored as ink packets.
Ink may be either transparent or non-transparent, as used herein. Ink that is transparent means that the ink does not fully conceal the background behind it when displayed on a display or printed on a printer. Ink that is not transparent completely conceals or occludes the background behind it. Non-transparent ink may also be referred to as opaque ink. For instance, FIG. 1 shows ink strokes 101, 102, and 103. Ink strokes 102 and 103 each overlay ink stroke 101, but ink stroke 103 completely conceals its background, including the portion of ink stroke 101 that it overlays (i.e., the portion of ink stroke 101 that is a background behind ink stroke 103). Thus, ink stroke 103 is considered opaque. In contrast, ink stroke 102 allows some of ink stroke 101, as well as some of the white background, to show through where ink stroke 102 overlays ink stroke 101. Thus, ink stroke 102 is considered transparent. Ink can be of any transparency and still be considered transparent. Current graphics interfaces are capable of applying transparent paint with a prescribed degree of transparency. For example, ink may be 50% transparent, which means that 50% of the background is concealed, or ink may be 25% transparent, which means that 75% of the background is concealed. A transparent ink stroke can be analogized with a piece of glass, such as colored glass, in which objects behind the glass can be seen. A non-transparent ink stroke can be analogized with a brick wall that hides everything behind it.
It is often desirable to render a transparent ink stroke dynamically while the ink stroke is being drawn, in other words, to draw the ink stroke on the display screen while the pointing device moves and adds new points to the ink stroke or strokes. One way to accomplish this is to erase the entire screen and redraw everything on the screen each time a new point is added to the ink stroke. This is an imperfect solution, however, since in practice there is typically a short time interval between ink points, and repeatedly clearing and redrawing the screen uses massive amounts of processing power, not to mention causing the screen to flicker. A way to reduce the redrawing time would be draw each new segment of an ink stroke as it is drawn. The problem with this is that the transparencies of the overlapping portion of ink segments are reduced in an unexpected and unintended manner. The effect of redrawing transparent ink is shown in FIG. 2, where the darker circles of an ink stroke 200 represent the overlapping start and end points of the segments. These overlapping areas are darker because they are each drawn twicexe2x80x94once when a segment ending with a particular point is drawn, and again when the next segment beginning with the same point is drawnxe2x80x94thereby reducing the transparency at the overlap. The result is an unintentionally non-uniform ink stroke. This is analogous to repeatedly making a glass window thicker, thereby making objects on the other side of the glass more difficult to see by making the window darker. The variable transparency of the rendered ink is unexpected to the user who would expect transparent ink to be rendered as transparent physical ink as applied to paper and/or over other ink.
There is also a need for providing various artistic features not provided by current systems, such as dynamically rendering ink responsive to variable width, pressure, speed, and angle of the pen.
Apparatus and methods are disclosed for dynamically rendering transparent ink strokes that solves at least one of the problems associated with rendering transparent ink. Using the present invention, the rendering of electronic ink (or ink as used herein) is improved. For example, the ink stroke may be dynamically rendered as a stroke having uniform transparency while it is being drawn. This may be performed without having to clear and redraw the entire screen.
To dynamically draw a transparent ink stroke, a computer system may draw only the segment that has most recently been added to the stroke. The system may further exclude areas of the new segment that overlap older portions of the stroke from being painted more than once, which would otherwise make the older segments less transparent. For instance, the color settings of pixels in the overlapping areas may be frozen before painting the new segment. Freezing the color settings may reduce or prevent unintended non-uniformities in the ink stroke.
These and other features of the invention will be apparent upon consideration of the following detailed description of preferred embodiments. It will be apparent to those skilled in the relevant technology, in light of the present specification, that alternate combinations of aspects of the invention, either alone or in combination with one or more elements or steps defined herein, may be used as modifications or alterations of the invention or as part of the invention. It is intended that the written description of the invention contained herein covers all such modifications and alterations.